package cn.jw.starter.game.common;

import java.time.Duration;

import cn.jw.starter.redis.core.api.IRedisKeyGenerator;

/**
 * @author 王广帅
 * @version 1.0.0
 * @since 2025/7/18 23:47
 */
public enum EnumGameCommonRedisKey implements IRedisKeyGenerator {
    GAME_WORLD_OFFSITE_TIME("game_world_offsite_time", Duration.ofDays(15));

    private String keyPrefix;
    private Duration expireTime;

    EnumGameCommonRedisKey(String keyPrefix, Duration expireTime) {
        this.keyPrefix = keyPrefix;
        this.expireTime = expireTime;
    }

    @Override
    public String getKeyPrefix() {
        return this.keyPrefix;
    }

    @Override
    public Duration getExpireTime() {
        return this.expireTime;
    }
}
